\input{regression-test.tex}
\documentclass{thuthesis}

\let\TRUE\undefined
\let\FALSE\undefined
\usepackage{algorithm}
\usepackage{algorithmic}

\pagestyle{empty}

\begin{document}

\chapter{标题}
\clearpage

\START
\showoutput

\begin{algorithm}[htb]
  \caption{Calculate $y = x^n$}
  \label{alg1}
  \begin{algorithmic}
    \REQUIRE $n \geq 0 \vee x \neq 0$
    \ENSURE $y = x^n$

    \STATE $y \leftarrow 1$
    \IF{$n < 0$}
       \STATE $X \leftarrow 1 / x$
       \STATE $N \leftarrow -n$
    \ELSE
       \STATE $X \leftarrow x$
       \STATE $N \leftarrow n$
    \ENDIF

    \WHILE{$N \neq 0$}
      \IF{$N$ is even}
        \STATE $X \leftarrow X \times X$
        \STATE $N \leftarrow N / 2$
      \ELSE[$N$ is odd]
        \STATE $y \leftarrow y \times X$
        \STATE $N \leftarrow N - 1$
      \ENDIF
    \ENDWHILE
  \end{algorithmic}
\end{algorithm}

\clearpage
\OMIT
\end{document}
